package vn.gq.app4vn.doctruyen;

import android.annotation.SuppressLint;
import android.os.Bundle;
import android.view.View;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.ProgressBar;

@SuppressLint("SetJavaScriptEnabled")
public class MoreAppActivity extends BaseActivity {
	
	private WebView webview;
	private ProgressBar progressbar;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_webview);
		
		String url = getIntent().getExtras().getString("URL");
		
		webview = (WebView) findViewById(R.id.webview);
		webview.getSettings().setJavaScriptEnabled(true);
		webview.setWebViewClient(new WebViewClient() {

			@Override
			public void onPageFinished(WebView view, String url) {
				progressbar.setVisibility(View.GONE);
				super.onPageFinished(view, url);
			}
			
		});
		webview.loadUrl(url);
		progressbar = (ProgressBar) findViewById(R.id.progressbar);
	}

}
